# Maintainer: Renato Silva <br.renatosilva@gmail.com>

_realname='pactoys'
pkgname="${_realname}-git"
pkgver=r2.07ca37f
pkgrel=1
pkgdesc='A set of pacman packaging utilities'
url='https://github.com/renatosilva/pactoys'
groups=('base' 'base-devel')
license=(BSD)
arch=(i686 x86_64)

provides=(${_realname})
conflicts=(${_realname} repman-git updpkgver-git)
replaces=(repman-git updpkgver-git)
depends=(pacman pkgfile wget)
makedepends=(gcc git)
install="${_realname}.install"
source=('git+https://github.com/renatosilva/pactoys')
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_realname}"
    printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}

build() {
    cd "${srcdir}/${_realname}"
    make
}

package() {
    cd "${srcdir}/${_realname}"
    make DESTDIR="${pkgdir}" install
}
